﻿package export.level
{
	import base.BaseLevelListener;
	
	import com.game.event.GameEventType;
	import com.game.manager.EventManager;
	import com.game.view.layer.GameCartoon;
	
	import flash.events.Event;
	
	public class StageListener41 extends BaseLevelListener
	{
		
		private var hasShowed:Boolean = false;
		
		public function StageListener41()
		{
			super();
		}
		
		public function showAnimate():void
		{
			if(this.hasShowed)
			{
				return;
			}
			this.hasShowed = true;
			EventManager.getIns().dispatchEvent(GameEventType.PAUSE_GAME);
			var cartoon:GameCartoon = new GameCartoon();
			cartoon.addEventListener(GameCartoon.SHOW_CARTOON_OVER,this.callBoss);
			cartoon.show("红孩儿复仇",GameCartoon.CONTINUE_GAME,true);
		}
		
		public function callBoss(param1:Event):void
		{
			param1.target.removeEventListener(GameCartoon.SHOW_CARTOON_OVER,callBoss);
			EventManager.getIns().dispatchEvent(GameEventType.CONTINUE_GAME);
			EventManager.getIns().dispatchEvent(GameEventType.CREATE_MONSTER,{type:405,x:1600,y:240});
		}
	}
}
